<template>
  <view class="cashDetailContain">
    <view class="information">
      <view class="headImg">
        <u-image height="240rpx" width="200rpx" radius="6" src="https://cdn.uviewui.com/uview/album/1.jpg"></u-image>
      </view>
      <view class="" style="height: 100%;">
        <view class="infoBox">
          <view class="info-name-id">
            <view class="info-name">
              案例的标题
            </view>
          </view>
        </view>
        <view class="collect-read">
          <view class="collect">
            <image src="https://cdn.uviewui.com/uview/album/1.jpg"></image>
            <view class="">
              发布者昵称
            </view>
          </view>
          <view class="collect">
            2024-02-05
          </view>
        </view>
      </view>
    </view>
    <u-line color="#747474" margin="30rpx" length="96%"></u-line>
    <view class="cashIntroDuce">
      案例背景介绍
    </view>
    <view class="cashIntroDuceDetail">
      这里展示案例背景介绍这里展示案例背景介绍这里展示案例背景介绍这里展示案例背景介绍这里展示案例背景介绍这里
      展示案例背景介绍这里展示案例背景介绍这里展示案例背景介绍这里展示案例背景介绍这里展示案例背景介绍这里展示
      案例背景介绍这里展示案例背景介绍这里展示案例背景介绍
      这里展示案例背景介绍
      这里展示案例背景介绍
    </view>
    <view class="bom-but">
      <button class="but" @click.stop="collectClick">
        <u-icon name="star" size="24"></u-icon>
        <text style="margin-left: 20rpx;">收藏</text>
      </button>
      <button class="but but2" @click.stop="readClick">
        <text style="color: black;">阅读</text>
      </button>
    </view>
  </view>
</template>

<script>
  export default {
    data() {
      return {
        cash_id: ""
      };
    },
    onLoad(op) {
      console.log(op.cash_id);
      this.cash_id = op.cash_id
    },
    methods: {
      readClick(id) {
        /* 阅读按钮*/
        uni.navigateTo({
          url: "/pages/cashRead/cashRead?id=" + id
        })
      },
      collectClick() {
        /* 收藏*/
      }
    }
  }
</script>

<style lang="scss">
  .cashDetailContain {
    padding: 0 30rpx 0;
    background-color: #f0f0f0;
    min-height: 100vh;

    .information {
      display: flex;
      align-items: center;
      height: 250rpx;

      .infoBox {
        display: flex;
        width: calc(100vw - 230rpx);
        height: 200rpx;
        padding: 16rpx 30rpx 0;
        box-sizing: border-box;

        .info-name-id {

          .info-name {
            font-weight: bold;
            font-size: 48rpx;
          }
        }
      }

      .collect-read {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 30rpx;

        .collect {
          display: flex;
          align-items: center;
          font-weight: 600;
          font-size: 30rpx;

          image {
            height: 40rpx;
            width: 40rpx;
            margin-right: 10rpx;
            border-radius: 10rpx;
          }

          .collect-txt {
            font-weight: 500;
            color: #434343;
            font-size: 28rpx;
          }
        }
      }
    }
  }

  .cashIntroDuce {
    font-size: 34rpx;
    font-weight: bold;
    padding-bottom: 20rpx;
  }

  .cashIntroDuceDetail {
    color: #5f5f5f;
  }

  .bom-but {
    display: flex;
    align-items: center;
    background-color: white;
    height: 120rpx;
    width: 100vw;
    position: fixed;
    bottom: 0rpx;
    left: 0rpx;
    padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
    padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2

    .but {
      width: 300rpx;
      display: flex;
      align-items: center;
      justify-content: center;
      background: white;
      border: 1rpx solid #8d8d8d;
    }

    .but2 {
      background-color: #dedede;
      border: none;
    }
  }
</style>